package com.tte.common.designpattern.abstractfactory;

/**
 * 工厂创造器/生成器类
 * @Description: 通过传递产地或商品来获取工厂
 * @Author: DongWH
 */
public class FactoryProducer {

    public static AbstractFactory getFactory(String choice){
        if(choice.equalsIgnoreCase("shopping")){
            return new ShoppingFactoryAbstract();
        } else if(choice.equalsIgnoreCase("place")){
            return new PlaceFactoryAbstract();
        }
        return null;
    }

}
